package com.baidumap.administrator.happystudy.model;

import com.ab.util.AbJsonUtil;

import java.util.List;

/**
 * 描述：
 * 作者：xiaoxing on 17/4/9 13:02
 * 邮箱：2235445233@qq.com
 */
public class Category {

    /**
     * code : 200
     * msg : success
     * data : [{"category_id":"22","category_name":"化妆品类","category_icon":null,"up_id":null,"level":null,"usetype":null,"index":"1"},{"category_id":"23","category_name":"外卖类","category_icon":null,"up_id":null,"level":null,"usetype":null,"index":"1"},{"category_id":"24","category_name":"超市类","category_icon":null,"up_id":null,"level":null,"usetype":null,"index":"1"}]
     */

    private String code;
    private String msg;
    private List<DataBean> data;

    /**
     * 用json构造自己
     *
     * @param json
     */
    public Category(String json) {
        Category result = AbJsonUtil.fromJson(json, this.getClass());
        this.code = result.getCode();
        this.msg = result.getMsg();
        this.data = result.getData();

    }


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean {
        /**
         * category_id : 22
         * category_name : 化妆品类
         * category_icon : null
         * up_id : null
         * level : null
         * usetype : null
         * index : 1
         */

        private String category_id;
        private String category_name;
        private Object category_icon;
        private Object up_id;
        private Object level;
        private Object usetype;
        private String index;

        public String getCategory_id() {
            return category_id;
        }

        public void setCategory_id(String category_id) {
            this.category_id = category_id;
        }

        public String getCategory_name() {
            return category_name;
        }

        public void setCategory_name(String category_name) {
            this.category_name = category_name;
        }

        public Object getCategory_icon() {
            return category_icon;
        }

        public void setCategory_icon(Object category_icon) {
            this.category_icon = category_icon;
        }

        public Object getUp_id() {
            return up_id;
        }

        public void setUp_id(Object up_id) {
            this.up_id = up_id;
        }

        public Object getLevel() {
            return level;
        }

        public void setLevel(Object level) {
            this.level = level;
        }

        public Object getUsetype() {
            return usetype;
        }

        public void setUsetype(Object usetype) {
            this.usetype = usetype;
        }

        public String getIndex() {
            return index;
        }

        public void setIndex(String index) {
            this.index = index;
        }
    }
}
